/**
 * @file
 * @author jinguangguo
 * @date 2017/9/10
 */

@mixin clearFloat {
    display: table;
    content: "";
    clear: both;
}

.layout-nav {
    position: fixed;
    width: 100%;
    z-index: 200;
    background-color: $color-bg-light;
    border-bottom: 2px solid #0d1113;

    &--index {
        background-color: transparent;
        border-bottom: 0;
        transition: all 0.5s;
        //background-color: rgba(1, 8, 22, 0.6);
        &:hover {
            //background-color: rgba(1, 8, 22, 0.6);
        }
        &--bg{
            background-color: rgba(1, 8, 22, 0.6);
        }
    }

    %h_common {
        height: $height-nav;
        line-height: $height-nav;
    }

    %menu_common {
        margin-right: 32px;
        .list {
            .item {
                float: left;
                margin-left: 32px;
                font-size: 13px;
                &:first-child {
                    margin-left: 0;
                }
                .img {
                    margin-right: 4px;
                    vertical-align: middle;
                }
                &-link {
                    vertical-align: middle;
                    box-sizing: border-box;
                    @extend %h_common;
                    color: #cecece;
                    &:hover {
                        color: #fff;
                        //background-color: inherit;
                    }
                    &--index {
                        @extend %h_common;
                        //color: #d6eefe;
                        color:#cecece;
                        &:hover {
                            color: #fff;
                        }
                    }
                    &--coming {
                        position: relative;
                        >.sub-tip-top{
                            position: absolute;
                            top:24px;
                            left: 50%;
                            transform: translateX(-50%);
                            line-height: 1em;
                            padding: 8px 16px;

                            border-radius: 4px;
                            box-shadow: 2px 2px 6px rgba(125, 125, 125, 0.2);
                            background-color: #fff;

                            color: #333;
                            font-size: 12px;
                            display: none;
                            white-space:nowrap;
                        }
                    }

                    //&:hover {
                    //    color: #fff;
                    //}
                    //&--active {
                    //    pointer-events: none;
                    //    color: #fff;
                    //}
                    //.icon {
                    //    display: inline-block;
                    //    width: 20px;
                    //    margin-left: 4px;
                    //    font-size: 12px;
                    //    font-weight: bold;
                    //}
                }

            }
        }
    }
    .nav-wrapper {
        box-sizing: border-box;
        min-width: $layout-width;
        padding: 0 16px;

        &--index {
            max-width: $layout-width;
            margin: 0 auto;
            border-bottom: 0;
            padding: 0;
        }
        .left {
            float: left;
            @extend %h_common;
            //position: absolute;
            //top: 50%;
            //transform: translateY(-50%);
            display: flex;
            align-items: center;
            .img {

            }

            // MENU
            .pop-menu {
                .content {
                    padding: 8px 0;
                }

            }

            .left-item {
                float: left;
                &--logo {
                    transform: translateY(10px);
                    padding-right: 16px;
                }
                &--nav {
                    min-width: 152px;
                    @extend %h_common;
                    border-left: 1px #000 solid;
                    border-right: 1px #000 solid;
                    text-align: center;
                    font-size: 13px;
                    background-color: inherit;
                    transition: all 0s ease;

                    display: flex;
                    justify-content: space-between;
                    align-items: center;
                    .icon, .text {
                        //vertical-align: middle;
                    }
                    .icon-coin {
                        //font-size: 24px;
                        //&:before {
                        //    color: #fff;
                        //}
                        display: inline-block;
                        width: 36px;
                        height: 36px;
                        margin-left:16px ;
                                    // btc, eth, ltc, act, smc, let, omg, eos, btm, tv, usc,bcd,bch,bchc,bta,btd,btg,lbtc,sbtc,abtc,btcking,btp,yoyow,trx,ipt
                        @each $coin in btc, eth, ltc, act, smc, let, omg, eos, btm, tv, usc,abtc,btp,yoyow,trx,ipt,cbtc,bck,kcash,btf,aac,emo,smcf1,vca,hmc{
                            &.coin-#{$coin} {
                                background-image: url('../../img/#{$coin}@2x.png');
                                background-position: center;
                                background-repeat: no-repeat;
                                background-size: contain;
                            }
                        }
                    }
                    .icon-arrow-down{
                        margin: 0 16px 0 10px;
                        padding: 4px;
                        //border: 1px solid #5c5d5e;
                        font-weight: bolder;
                        color: #fff;
                    }
                    .text {
                        color: #fff;
                    }
                }
            }
            .comp-market-info {
                float: left;
                margin-left: 24px;
            }
            >.menu {
                @extend %menu_common;
                margin-left: 32px;
                .list {
                    .item {
                        margin-left: 32px;
                    }
                }
            }
        }
        .right {
            //position: relative;
            float: right;
            height: $height-nav;
            //z-index: 1;
            display: flex;
            align-items: center;
            .menu{
                @extend %menu_common;
            }
            .do {
                position: relative;
                font-size: 13px;
                .do-link {
                    margin-right: 32px;
                    border: 1px #cecece solid;
                    padding: 4px 16px;
                    color: #cecece;
                    border-radius: 0;
                    vertical-align: middle;
                    // &:hover {
                    //     background-color: #fff;
                    // }
                    &:last-child {
                        margin-right: 0;
                    }
                    &--index {
                        // padding: 0;
                        // border: none;
                        color: #cecece;
                        &:hover {
                            color: #1e97fc;
                            border-color: #1e97fc;
                            background-color: inherit;
                        }
                        &:first-child {
                            //margin-right: 32px;
                        }
                        &-logout {
                            //color: #d6eefe;
                            // border: 1px solid #fff;
                            // padding: 4px 16px;
                            &:hover {
                                color: #1e97fc;
                                border-color: #1e97fc;
                                // background-color: rgba(255, 255, 255, 0.1);
                            }
                        }
                    }
                    &--logout {
                        color: #cecece;
                        border: 1px #cecece solid;
                        //color: #d6eefe;
                        // border: 1px solid #fff;
                        // padding: 4px 16px;
                        &:hover {
                            color: #1e97fc;
                            border-color: #1e97fc;
                            // background-color: rgba(255, 255, 255, 0.1);
                        }
                    }
                }
                .module-rechage {
                    position: relative;
                    display: inline-block;
                    height: $height-nav;
                    line-height: $height-nav;
                    vertical-align: middle;
                    .recharge-link {
                        display: block;
                        height: 100%;
                        margin-right: 16px;
                        color: #fff;
                    }
                    .menu-recharge {
                        display: none;
                        position: absolute;
                        top: 100%;
                        left: -16px;
                        //transform: translate(-50%, 0);
                        border: 1px solid rgba(0, 0, 0, 0.2);
                        border-radius: 4px;
                        box-shadow: 1px 1px 5px rgba(125, 125, 125, 0.04);
                        background-color: #313131;
                        font-size: 12px;
                        .item {
                            border-bottom: 1px black solid;
                            .item-link {
                                display: block;
                                min-width: 86px;
                                height: 40px;
                                line-height: 40px;
                                padding: 0 16px;
                                .img {
                                    margin-right: 4px;
                                    vertical-align: middle;
                                }
                                .text {
                                    color: #fff;
                                }
                                &:hover {
                                    background-color: #262a2d;
                                }
                            }
                        }
                    }
                }
            }

            .lang {
                overflow: hidden;
                //width: 90px;
                margin-left: 32px;
                height: $height-nav;
                line-height: $height-nav - 2;
                .lang-link {
                    display: block;
                    height: 100%;
                    .img {
                        vertical-align: middle;
                        //margin-right: 4px;
                    }
                    .text {
                        vertical-align: middle;
                        color: #ededed;
                    }
                }
                .content {
                    padding: 0;
                }
                .lang-content {
                    .list {
                        .item {
                            border-bottom: 1px black solid;
                            .item-link {
                                display: block;
                                height: 40px;
                                line-height: 40px;
                                padding-left: 16px;
                                .img {
                                    margin-right: 4px;
                                    vertical-align: middle;
                                }
                                .text {
                                    color: #ededed;
                                }
                                .icon{
                                    font-weight: bold;
                                    margin-left: 4px;
                                    color: #ededed;
                                }
                                &:hover {
                                    background-color: #262a2d;
                                    color: #fff;
                                }
                            }
                        }
                    }
                }

            }
        }
    }

    &--simple {
        background-color: inherit;
        border-bottom: 0;
        .nav-wrapper .right .lang .lang-link .text {
            color: $color-font;
        }
    }

}

@media screen and (max-width:1440px){
    .layout-nav{
        .nav-wrapper {
            padding: 0 16px;
            .right {
                .menu {
                    margin-right: 16px;
                    .list {
                        .item {
                            margin-left: 16px;
                        }
                    }
                }
            }
        }
    }
}
// 有领取ACT活动时请保留
.layout-nav .nav-wrapper .right .do .js-login{
    margin-right: 32px;
}
.layout-nav .nav-wrapper .right .do .js-presend{
    border-radius: 5px;
    border: 1px dashed #1e97fc;
    padding: 5px 16px;
}